﻿Public Class Form1

    Dim Key() As Char = Nothing
    Dim klar() As Char = Nothing
    Dim chiffre() As Char = Nothing


    Private Sub btnEncode_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEncode.Click
        If txtKey.TextLength < 8 Then
            MsgBox("Bitte geben Sie einen längeren Key ein!")
        Else
            Key = getKEY(txtKey.Text)
            MsgBox(Key(1))
        End If

    End Sub


    Private Function getKEY(ByVal strKey As String) As Array
        Dim privarray() As String = Nothing
        For I = 1 To Len(strKey)
            privarray(I - 1) = Mid(strKey, I, 1)
        Next I
        Return privarray
    End Function

    Private Function getKlar(ByVal strKlar As String) As Array
        Dim privarray() As String = Nothing
        For I = 1 To Len(strKlar)
            privarray(I) = GetChar(strKlar, I).ToString
        Next I
        Return privarray
    End Function

    Private Function getChiffre(ByVal strChiffre As String) As Array
        Dim privarray() As String = Nothing
        For I = 1 To Len(strChiffre)
            privarray(I) = GetChar(strChiffre, I).ToString
        Next I
        Return privarray
    End Function

    'Private Function encode(ByVal arrKey() As String, ByVal arrKlar() As String) As Array

    'End Function
End Class
